package cn.wapache.timed;

import java.io.Serializable;

import cn.wapache.time.calendar.Calendar;
import cn.wapache.time.trigger.Trigger;

public class Task implements Serializable {

	private static final long serialVersionUID = 3943456906593225205L;

	public enum State { NONE, NORMAL, PAUSED, COMPLETE, ERROR }

	String id;
	
	State status;

    long createTime;
    long startTime;
    long stopTime;
    
    String creator;
    
    Job jobSnapshot;
    Trigger triggerSnapshot;
    Calendar calendarSnapshot;
    
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public State getStatus() {
		return status;
	}

	public void setStatus(State status) {
		this.status = status;
	}

	public long getCreateTime() {
		return createTime;
	}

	public void setCreateTime(long createTime) {
		this.createTime = createTime;
	}

	public long getStartTime() {
		return startTime;
	}

	public void setStartTime(long startTime) {
		this.startTime = startTime;
	}

	public long getStopTime() {
		return stopTime;
	}

	public void setStopTime(long stopTime) {
		this.stopTime = stopTime;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public Job getJobSnapshot() {
		return jobSnapshot;
	}

	public void setJobSnapshot(Job jobSnapshot) {
		this.jobSnapshot = jobSnapshot;
	}

	public Trigger getTriggerSnapshot() {
		return triggerSnapshot;
	}

	public void setTriggerSnapshot(Trigger triggerSnapshot) {
		this.triggerSnapshot = triggerSnapshot;
	}

	public Calendar getCalendarSnapshot() {
		return calendarSnapshot;
	}

	public void setCalendarSnapshot(Calendar calendarSnapshot) {
		this.calendarSnapshot = calendarSnapshot;
	}
	
}
